{temp('admin/head')}

</head>
<body class="page-body login-page">

	<div class="login-container">
	
		<div class="row">
		
			<div class="col-sm-6">
			
				<script type="text/javascript">
					jQuery(document).ready(function($)
					{
						// Reveal Login form
						setTimeout(function(){ $(".fade-in-effect").addClass('in'); }, 1);
						
						// Validation and Ajax action
						$("form#login").validate({
							rules: {
								username: {
									required: true
								},
								passwd: {
									required: true
								}
							},
							messages: {
								username: {
									required: '请填写你的用户名。'
								},
								passwd: {
									required: '请填写你的密码。'
								}
							},
							// Form Processing via AJAX
							submitHandler: function(form)
							{
								show_loading_bar(70); // Fill progress bar to 70% (just a given value)
								var opts = {
									"closeButton": true,
									"debug": false,
									"positionClass": "toast-top-full-width",
									"onclick": null,
									"showDuration": "300",
									"hideDuration": "1000",
									"timeOut": "5000",
									"extendedTimeOut": "1000",
									"showEasing": "swing",
									"hideEasing": "linear",
									"showMethod": "fadeIn",
									"hideMethod": "fadeOut"
								};
								var username = $('#username').val();
								var passwd = $('#passwd').val();
								$.post('/admin/?act=login',{username:username,passwd:passwd},function(data){
									show_loading_bar({
										delay: .5,
										pct: 100,
										finish: function(){
											if(data == '-1'){
												toastr.error("账户被锁定", "登录失败!", opts);
												$passwd.select();
											}else if(data == '登录成功'){
												window.location.href = '/admin/?act=main';
											}else{
												toastr.error("你输入的用户名或者密码错误，请重新输入", "登录失败!", opts);
												$passwd.select();
											}
										}
									});
								});
							}
						});
						
						// Set Form focus
						$("form#login .form-group:has(.form-control):first .form-control").focus();
					});
				</script>
				
				<!-- Errors container -->
				<div class="errors-container">
				
									
				</div>
				
				<!-- Add class "fade-in-effect" for login form effect -->
				<form method="post" role="form" id="login" class="login-form fade-in-effect">
					
					<div class="login-header">
						<a href="{$_url}/admin" class="logo">
							<img src="{$adstyle}/images/sklogo.png" alt="" width="80" />
							<span>登录</span>
						</a>
						<p>亲爱的用户, 欢迎你访问后台管理中心!</p>
					</div>
					
					<div class="form-group">
						<label class="control-label" for="username">用户名</label>
						<input type="text" class="form-control input-dark" name="username" id="username" autocomplete="off" />
					</div>
					
					<div class="form-group">
						<label class="control-label" for="passwd">密码</label>
						<input type="password" class="form-control input-dark" name="passwd" id="passwd" autocomplete="off" />
					</div>
					
					<div class="form-group">
						<button type="submit" class="btn btn-dark  btn-block text-left">
							<i class="fa-lock"></i>
							登录
						</button>
					</div>
					
				</form>
				
			</div>
			
		</div>
		
	</div>

	<!-- Bottom Scripts -->
	<script src="{$adstyle}/js/bootstrap.min.js"></script>
	<script src="{$adstyle}/js/TweenMax.min.js"></script>
	<script src="{$adstyle}/js/resizeable.js"></script>
	<script src="{$adstyle}/js/joinable.js"></script>
	<script src="{$adstyle}/js/xenon-api.js"></script>
	<script src="{$adstyle}/js/xenon-toggles.js"></script>
	<script src="{$adstyle}/js/jquery-validate/jquery.validate.min.js"></script>
	<script src="{$adstyle}/js/toastr/toastr.min.js"></script>


	<!-- JavaScripts initializations and stuff -->
	<script src="{$adstyle}/js/xenon-custom.js"></script>

</body>
</html>